@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API: {
                get_buyer_list_url: "{{route('admin.purchaser.index')}}", // 获取采购商数据,搜索
                del_buyer_url: "{{route('admin.purchaser.batch-remove')}}", //批量删除,
                addrProvince: "{{route('area.province')}}", //一级地区
                addrCity: "{{route('area.city')}}", //二级地区
                addrCounty: "{{route('area.county')}}", //三级地区
            },
            screenList: [
                {code: 1, text: "用户名"},
                {code: 2, text: "公司名"}
            ], //筛选列表
        };
    </script>
@stop

@section('c-body')

    <div class="comm-title">
        <span class="title-msg">会员 > 采购商 > 列表</span>
    </div>
    <div class="comm-body">
        <div class="tab-body current1">
            <div class="supplyList-screen mt20">
                <div class="supplyList-screen-main">
                    <div class="sl-screen-box">
                        <div>
                            <select style="width: 75px;height: 30px;" id="username">
                            </select>
                            <input type="text" style="width: 170px;height: 30px;" id="name">
                            <span class="lh30 c-gray">申请时间：</span>
                            <input type="text" readonly="readonly" class="sel-order-time  time" id="start_time"> -
                            <input type="text" readonly="readonly" class="sel-order-time  time" id="end_time">
                            <span class="ml5 lh30 c-gray">所在地区：</span>
                            <select class="district" id="province">
                            </select>
                            <select class="district" id="city" style="display: none">
                            </select>
                            <select class="district" id="county" style="display: none">
                            </select>
                            <button id="search-btn" type="button" class="am-btn am-btn-success am-btn-xs ml10">搜索</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 表单列表 -->
            <table class="am-table am-table-striped am-table-hover am-table-centered brand-manage-tbl shopAdmin-list">
                <thead>
                <tr>
                    <th style="width:5%">
                        <span style="visibility:hidden;">1</span>
                    </th>
                    <th>用户名</th>
                    <th>公司全称</th>
                    <th>所在地区</th>
                    <th>申请时间</th>
                   {{-- <th>店铺状态</th>--}}
                    <th style="width:15%">操作</th>
                </tr>
                </thead>
                <tbody class="shopAdmin-list-body" id="buyerList-context">
                </tbody>
            </table>
            <div class="tool-bar-bottom clearfix">
                <div class="unit">
                    <input id="sel-all-chk" type="checkbox" class="mid" style="position: relative; top:13px;" />
                </div>
                <div class="unit">
                    <label for="sel-all-chk" style="cursor:pointer;font-weight:300;">全选</label>
                </div>
                <div class="unit">
                    <button id="del-multi-btn" type="button" class="am-btn am-btn-default am-btn-xs ml10" style="position: relative;float:left;top:5px;">删除</button>
                </div>
            </div>
            <div id="comm-paging" class="admin-paging" current-page="1"></div>
        </div>
    </div>
    <script type="text/template" id="districtTemp">
        <option value="">请选择</option>
        <%_.each(obj, function(item){%>
        <option value="<%=item.code%>">
            <%=item.text%>
        </option>
        <%})%>
    </script>
    <script type="text/template" id="buyerListTemp">
        <%_.each(obj, function(item){%>
        <tr>
            <td class="sel-chk">
                <input type="checkbox" id="<%=item.id%>" />
            </td>
            <td style="max-width: 100px">
                <%=item.username%>
            </td>
            <td style="max-width: 185px">
                <%=item.companyname%>
            </td>
            <td style="max-width: 100px">
                <%=item.district%>
            </td>
            <td style="max-width: 100px">
                <%=item.storestate%>
            </td>
           {{-- <td style="max-width: 100px">开启</td>--}}
            <td style="width:15%">
                <div class="operate-btns-2 clearfix">
                    <a id="" type="button" class="edit-brand-btn am-btn am-btn-primary am-btn-xs" href="<%=item.editorurl%>" style="float:left;">编辑</a>
                    <button id="" type="button" class=" am-btn am-btn-default am-btn-xs del-buyer-btn" style="float:left; margin-left: 10px;" href="<%=item.deleurl%>">删除</button>
                </div>
            </td>
        </tr>
        <%})%>
    </script>
    <script src="/assets/b2b/admin/js/pages/11.js"></script>
@stop